#include <iostream>
using namespace std;

void swap(int a[], int m, int n){
	for(int i = 0;i<m;i++){
		int temp = a[0];
		for(int j = 0;j < m+n-1;j++)
			a[j] = a[j+1];
		a[m+n-1] = temp;
	}
}

void main(){
	int a[] = {1,2,3,4,5,6};
	swap(a,3,3);
	for(int i = 0;i < 6;i++)
		cout << a[i] << " ";
	cout << endl;
	system("pause");
}